package com.hmy.infrastructure.bo.response;

import lombok.Data;

import java.io.Serializable;

/**
 * 校验验证码结果
 */
@Data
public class CheckVerificationCodeResponse implements Serializable {
    private Boolean success;

    private String message = "校验成功";

    private CheckVerificationCodeResponse(Boolean success) {
        this.success = success;
    }

    public CheckVerificationCodeResponse(Boolean success, String message) {
        this.success = success;
        this.message = message;
    }


    public static CheckVerificationCodeResponse success() {
        return new CheckVerificationCodeResponse(true);
    }

    public static CheckVerificationCodeResponse fail(String message) {
        return new CheckVerificationCodeResponse(false, message);
    }
}
